home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / kprof / RCS / prof.c,v < prev   
Encoding:
Text File  |  1988-09-23  |  1021 b   |  61 lines

  1. head     1.1;
  2. access   ;
  3. symbols  ;
  4. locks    mendel:1.1; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 1.1
  9. date     88.09.23.11.55.08;  author mendel;  state Exp;
  10. branches ;
  11. next     ;
  12.  
  13.  
  14. desc
  15. @@
  16.  
  17.  
  18.  
  19. 1.1
  20. log
  21. @Initial revision
  22. @
  23. text
  24. @#include "sprite.h"
  25. #include "io.h"
  26.  
  27. main(argc, argv)
  28.     int argc;
  29.     char *argv[];
  30. {
  31.     ReturnStatus status;
  32.     char *fileName;
  33.     char *option;
  34.  
  35.     if (argc < 2) {
  36.     Io_Print("Usage: prof <start | end | dump filename>\n");
  37.     Io_Print(" - argc = %d\n", argc);
  38.     Io_Print(" - %x %x %x\n", argv[0], argv[1], argv[2]);
  39.     Proc_Exit(1);
  40.     } else {
  41.     if (argc > 3) {
  42.         Io_Print("Extra arguments ignored: %s...\n", argv[3]);
  43.     }
  44.     option = argv[1];
  45.     fileName = argv[2];
  46.     }
  47.     if (String_Compare(option, "start") == 0) {
  48.     status = Prof_Start();
  49.     } else if (String_Compare(option, "end") == 0) {
  50.     status = Prof_End();
  51.     } else if (String_Compare(option, "dump") == 0) {
  52.     status = Prof_Dump(fileName);
  53.     } else {
  54.     Io_Print("Unknown option: %s\n", option);
  55.     status = 1;
  56.     }
  57.  
  58.     Proc_Exit(status);
  59. }
  60. @
  61.